package com.blb.zycommunity.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.zycommunity.entity.ZyComplaintSuggest;
import com.blb.zycommunity.mapper.ZyComplaintSuggestMapper;
import com.blb.zycommunity.service.IZyComplaintSuggestService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 投诉建议  服务实现类
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
@Service
public class ZyComplaintSuggestServiceImpl extends ServiceImpl<ZyComplaintSuggestMapper, ZyComplaintSuggest> implements IZyComplaintSuggestService {


    @Resource
    private ZyComplaintSuggestMapper zyComplaintSuggestMapper;

    @Override
    public IPage<ZyComplaintSuggest> findComplaintSuggestPage(Long current, Long size, String complaintSuggestType, String communityId) {
        return zyComplaintSuggestMapper.selectComplaintSuggestPage(new Page<>(current,size),complaintSuggestType,communityId);
    }

    @Override
    public List<ZyComplaintSuggest> selectByName(String createBy) {
        List<ZyComplaintSuggest> zyComplaintSuggests = zyComplaintSuggestMapper.selectByName(createBy);
        return zyComplaintSuggests;
    }
}
